In one type of color imaging array as disclosed in U.S. Pat. No. 3,971,065, issued Jul. 20, 1976, inventor Bayer, a mosaic of selectively transmissive filters is superposed in registration with a solid state imaging array having a broad range of light sensitivity. The distribution of filter types in the mosaic is such that one color, such as green, representing a luminance signal, predominates over filters for other colors such as red and blue. Thus, in one filter format, the green filters alternate both horizontally and vertically with either a blue filter or a red filter. Thus, half of the pixels represent green, while a quarter each of the remaining pixels represent red and blue. The filter format can be selected to represent different proportions of green, red, and blue. In such a color imaging array, the individual pixels must be processed by means of (1) a white balance operation on each of the three color components, (2) spatial interpolation to recover the original scene colors having parallel red, blue, and green components, and (3) a color-correction matrix in order to produce a correct color rendering which can be used to display the image on a color monitor.
Incoming pixels are defined as a sparse matrix. This is defined as a sparse matrix such that matrix arithmetic notation can be used to describe the operations. For the Bayer CFA (Color Filter Array), there are three pixel colors, that of Red, Green, and Blue. First, a generic RGB triplet is defined, and then a representation of actual pixels as they are read off of the sensor are shown as a sparse form of this matrix. Thus, for a generic RGB triplet and their actual Bayer equivalents: ##EQU1##
It is also determined, at the user's discretion, a set of white balance coefficients. These white balance coefficients are based on the selection by the user of a neutral area of the image. All of the red, green, and blue pixels are taken in this region, and after subtracting the black setup value, their ratios are computed in order to derive the necessary white balance coefficients. This triplet is denoted as follows: ##EQU2##
The spectral response of the sensor is characterized in order to be able to compute an optimal color correction matrix. Essentially, this 3.times.3 matrix is an array of 9 coefficients which gets multiplied by the fully reconstructed RGB triplets. This results in a color corrected RGB triplet This color correction matrix denoted as follows: ##EQU3##
The sequencing of white balancing, spatial processing, and then color correcting can be seen as the following sequence of operations.
Given an input pixel ##EQU4## there is first calculated a white balanced version of it, p.sub.wb, as follows: ##EQU5## Keep in mind that as these still describes the pixel at the input, that the triplets are degenerated such that only one of their components is non-zero, depending on the color of the pixel.
This resulting pixel is passed through the spatial processing, which can be represented as follows: ##EQU6## By this time, the pixel is fully reconstructed, so this latter matrix represents a full RGB triplet. Next, this result is multiplied with the color-correction matrix to obtain the following result: ##EQU7##
One of the most costly numerical operations in silicon-based signal processing is to do a multiply. However, multiplies are throughout the latter algorithm.
It would be desirable to provide color correction and white balance processing of a color image that solves the problems discussed above.